﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Cms.Admin.Article.List" %>
<%@ Register src="../../Common/Controls/Selecter.ascx" tagname="Selecter" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function moveDept()
    {
        var hidSelectIDs = document.getElementById('<%=hidSelectIDs.ClientID %>');
        var btnRefresh = document.getElementById('<%=btnRefresh.ClientID %>');
        var url = "Move.aspx?ArticleIDs=" + hidSelectIDs.value;

        var rtValue = showDlg(url);
        if (rtValue == true)
        {
            btnRefresh.click();
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:HiddenField ID="hidOrders" runat="server" />
    <div id="toolbar">
        <ul>
            <li><a id="lnkAdd" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/addnew.gif);">
                &nbsp;</b><asp:Literal ID="Literal1" runat="server" Text="增加"></asp:Literal></span></a></li>
            <li><a id="lnkDelete" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/delete.gif);">
                &nbsp;</b><asp:Literal ID="Literal4" runat="server" Text="删除"></asp:Literal></span></a></li>
            <li><a id="lnkMove" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/move.gif);">
                &nbsp;</b>移动</span> </a></li>
            <li><a id="lnkSaveOrders" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/SORT.gif);">
                &nbsp;</b><asp:Literal ID="Literal5" runat="server" Text="排序"></asp:Literal></span></a></li>
        </ul>
    </div>
  
    <div id="head">
        <div class="left">
            <asp:Label ID="lblMenuName" runat="server" Text="Label" Visible="false" Font-Bold="true"></asp:Label><asp:Label
                ID="lblStatistic" runat="server" Text="Label"></asp:Label></div>
        <div class="right">
            <asp:Label ID="Label4" runat="server" Text="标题：" Font-Bold="true"></asp:Label><asp:TextBox
                ID="txtSearch" runat="server" Width="113px" CssClass="txt"></asp:TextBox>
            <asp:Button ID="btnSearch" runat="server" Text="搜索" 
                onclick="btnRefresh_Click" />
            <asp:DropDownList ID="drpPager" runat="server" OnSelectedIndexChanged="drpPager_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    <div id="list">
        <asp:HiddenField ID="hidSelectIDs" runat="server" Value="" />
        <table id="lvList" cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr id="lvHeader" runat="server">
                <th class="sp">
                    &nbsp;
                </th>
                <th class="chk">
                    <asp:CheckBox ID="chkSelectAll" runat="server" />
                </th>
                <th>
                    文章标题
                </th>
                <th>
                    发布时间
                </th>
                <th>
                    发布人
                </th>                
                <th>
                    所属栏目
                </th>
                <th>
                    推荐
                </th>
                <th>
                    显示
                </th>
                <th>
                    排序
                </th>  
                <th>修改</th>              
            </tr>
            <asp:ListView ID="lv" runat="server" ItemPlaceholderID="items" 
                onitemdatabound="lv_ItemDataBound">
                <LayoutTemplate>
                    <tr id="items" runat="server">
                    </tr>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="row" runat="server">
                        <td class="sp">
                            &nbsp;
                        </td>
                        <td class="chk">
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </td>
                        <td>
                            <asp:HyperLink ID="lnkName" runat="server" NavigateUrl="#" Text='<%# Eval("Name") %>'
                            EnableViewState="False"></asp:HyperLink>
                        </td>
                        <td>
                            <%#Eval("InputTime","{0:d}") %>&nbsp;
                        </td>
                        <td>
                            <%# Eval("CreatorName")%>&nbsp;
                        </td>
                        <td>
                            <%# Eval("MenuName") %>
                        </td>
                        <td>
                            <%# ((bool)Eval("IsRecommend"))?"<span style='color:red'>荐</span>":"否" %>
                        </td>
                        <td>
                            <%#((bool)Eval("IsDisplay"))?"显示":"隐藏" %>
                        </td>
                       
                        <td>
                            <asp:TextBox ID="txtOrders" runat="server" Text='<%# Eval("Orders") %>' Width="30px"
                            EnableViewState="False" CssClass="out"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtOrders"
                            Display="Dynamic" ErrorMessage="数字格式不对" ValidationExpression="-?\d*"></asp:RegularExpressionValidator>
                        </td>
                        <td>
                             <asp:HyperLink ID="lnkEdit" runat="server">修改</asp:HyperLink>
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <tr>
                        <td colspan="10" class="empty">
                            没有文章
                        </td>
                    </tr>
                </EmptyDataTemplate>
            </asp:ListView>
        </table>       
    </div>
     <div id="foot">
        <uc1:Selecter ID="Selecter1" runat="server" />
        <asp:Literal ID="litPager" runat="server"></asp:Literal></div>
    <div style="clear: both;" />
    <div id="toolbar_bottom">
        <asp:Button ID="btnRefresh" runat="server" Text="Button" OnClick="btnRefresh_Click"
            CssClass="refresh" />
        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" CausesValidation="False" />
        <input id="btnMove" runat="server" type="button" value="移动" />
        <asp:Button ID="btnSaveOrders" runat="server" Text="排序" OnClick="btnSaveSequence_Click"
            CausesValidation="False" />
    </div>
</asp:Content>
